package com.example.servicechat.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/api/chat")
public class TestController extends ABaseController {

//    空指针异常
    @GetMapping("data")
    public String test() {
        String name = null;
        name.toString();
        return "ok";
    }

    @GetMapping("data0")
    public String test11() {
        String name = null;
        return "ok";
    }


    //    算术异常
    @GetMapping("data1")
    public String test1() {
        int i = 1/0;
        return "ok";
    }


}
